#include<stdio.h>
#include<stdlib.h>

int main(int argc,char **argv)
{
	if(argc!=2){
		printf("Usage:%s filepath\n",argv[0]);
		return -1;
	}
	
	FILE *fp = fopen(argv[1],"r");
	if(!fp){
		perror("fopen");
		return -1;
	}

	fseek(fp,0,SEEK_END);	

	printf("filesize = %ld\n",ftell(fp));

	fclose(fp);
	return 0;
}